package bean;

/**
 * A base class for Comment for manipulation of the data
 * @author Anne Lorayne
 *
 */
public class CommentBean {
 


	private String ID;
	 
	private String comment;
	
	private String login;
	 
	/**
	 * Constructor of the class
	 * @param ID
	 * @param comment
	 */
	public CommentBean(String ID, String comment, String login){
		this.ID = ID;
		this.comment = comment;
		this.login = login;
	}
	
	public CommentBean(){}

	
	// ------Getters and Setters------
	
	public String getID() {
		return ID;
	}

	public void setID(String iD) {
		ID = iD;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}
	
	/**
	 * @return the login
	 */
	public String getLogin() {
		return login;
	}

	/**
	 * @param login the login to set
	 */
	public void setLogin(String login) {
		this.login = login;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof CommentBean))
			return false;
		CommentBean other = (CommentBean) obj;
		if (ID == null) {
			if (other.ID != null)
				return false;
		} else if (!ID.equals(other.ID))
			return false;
		return true;
	}

}
 
